/**
 * Created by will on 2017/9/25.
 */
$(function () {
    $("#public-style").load("./easytrip-header.html")
    layui.use('table', function(){
        var table = layui.table;

        //展示已知数据
        table.render({
            elem: '#supplylist-table'
            ,data: [{
                "supplyname": "湖南易旅科技有限公司"
                ,"settlement": "月结"
                ,"sign": "俞懿洋"
                ,"date": "2017/06/20"
                ,"contract": "下载"
                ,"state": "禁用"
            }, {
                "supplyname": "湖南易旅科技有限公司"
                ,"settlement": "月结"
                ,"sign": "俞懿洋"
                ,"date": "2017/06/20"
                ,"contract": "未上传"
                ,"state": "启用"
            }, {
                "supplyname": "湖南易旅科技有限公司"
                ,"settlement": "月结"
                ,"sign": "俞懿洋"
                ,"date": "2017/06/20"
                ,"contract": "下载"
                ,"state": "禁用"
            }, {
                "supplyname": "湖南易旅科技有限公司"
                ,"settlement": "月结"
                ,"sign": "俞懿洋"
                ,"date": "2017/06/20"
                ,"contract": "下载"
                ,"state": "禁用"
            }, {
                "supplyname": "湖南易旅科技有限公司"
                ,"settlement": "月结"
                ,"sign": "俞懿洋"
                ,"date": "2017/06/20"
                ,"contract": "下载"
                ,"state": "禁用"
            }, {
                "supplyname": "湖南易旅科技有限公司"
                ,"settlement": "月结"
                ,"sign": "俞懿洋"
                ,"date": "2017/06/20"
                ,"contract": "下载"
                ,"state": "禁用"
            }, {
                "supplyname": "湖南易旅科技有限公司"
                ,"settlement": "月结"
                ,"sign": "俞懿洋"
                ,"date": "2017/06/20"
                ,"contract": "下载"
                ,"state": "禁用"
            }, {
                "supplyname": "湖南易旅科技有限公司"
                ,"settlement": "月结"
                ,"sign": "俞懿洋"
                ,"date": "2017/06/20"
                ,"contract": "下载"
                ,"state": "禁用"
            }, {
                "supplyname": "湖南易旅科技有限公司"
                ,"settlement": "月结"
                ,"sign": "俞懿洋"
                ,"date": "2017/06/20"
                ,"contract": "下载"
                ,"state": "禁用"
            }, {
                "supplyname": "湖南易旅科技有限公司"
                ,"settlement": "月结"
                ,"sign": "俞懿洋"
                ,"date": "2017/06/20"
                ,"contract": "下载"
                ,"state": "禁用"
            }, {
                "supplyname": "湖南易旅科技有限公司"
                ,"settlement": "月结"
                ,"sign": "俞懿洋"
                ,"date": "2017/06/20"
                ,"contract": "下载"
                ,"state": "禁用"
            }, {
                "supplyname": "湖南易旅科技有限公司"
                ,"settlement": "月结"
                ,"sign": "俞懿洋"
                ,"date": "2017/06/20"
                ,"contract": "下载"
                ,"state": "禁用"
            }, {
                "supplyname": "湖南易旅科技有限公司"
                ,"settlement": "月结"
                ,"sign": "俞懿洋"
                ,"date": "2017/06/20"
                ,"contract": "下载"
                ,"state": "禁用"
            }, {
                "supplyname": "湖南易旅科技有限公司"
                ,"settlement": "月结"
                ,"sign": "俞懿洋"
                ,"date": "2017/06/20"
                ,"contract": "下载"
                ,"state": "禁用"
            }]
            ,height: 1000
            ,cols: [[ //标题栏
                // {checkbox: true, LAY_CHECKED: true} //默认全选
                {field: 'supplyname', title: '供应商名称', width: 278}
                ,{field: 'settlement', title: '结算方式', width: 220}
                ,{field: 'sign', title: '签约人', width: 220}
                ,{field: 'date', title: '签约日期', width: 220}
                ,{field: 'contract', title: '合同', width: 220}
                ,{field: 'state', title: '状态', width: 220}
                ,{title: '操作',width:220, align:'center', toolbar: '#barDemo'}
            ]]
            ,skin: 'line' //表格风格
            ,page: true //是否显示分页
            ,limits: [5, 7, 10]
            ,limit:11 //每页默认显示的数量
            ,theme:'#45a2fff'
        });
    });
})